/**
 * Created with IntelliJ IDEA.
 * Description:
 * Date: 2025-03-02
 * Time: 19:01
 */
public class demo2 {
    public static void main(String[] args) {
        String s = "abcqweracb";
        String result = isRepeat(s);
        System.out.println(result);
    }

    private static String isRepeat(String s) {
        boolean[] flg = new boolean[127];
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < s.length(); i++) {
            if (!flg[s.charAt(i)]) {
                stringBuilder.append(s.charAt(i));
                flg[s.charAt(i)] = true;
            }
        }
        return stringBuilder.toString();
    }
}
